<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2018/12/10
 * Time: 11:36
 */
require('../vendor/autoload.php');
require('../define.php');
require('util/WechatPlatform.php');

$oauth = \wechat\util\WechatPlatform::getOfficiaInstance()->oauth;
// 获取 OAuth 授权结果用户信息
$user = $oauth->user();
$_SESSION['wechat_user'] = $user->toArray();
$_SESSION['open_id'] = $user->getId();
print_r($user);
